

public class MyLink extends Object {
    double capacity; // should be private 
    double weight;   // should be private for good practice
    int id;
    
    public MyLink(double weight, double capacity) {
        this.id = 1; //edgeCount++; // This is defined in the outer class.
        this.weight = weight;
        this.capacity = capacity;
    } 
    
    public double getCapacity() {
		return capacity;
	}
	public void setCapacity(double capacity) {
		this.capacity = capacity;
	}
	public double getWeight() {
		return weight;
	}
	public void setWeight(double weight) {
		this.weight = weight;
	}
	public String toString() { // Always good for debugging
        return "E"+id;
    }
    
}